package fun.linze.wallpaperwebsite.controller;


import fun.linze.wallpaperwebsite.mapper.TTagMapper;
import fun.linze.wallpaperwebsite.service.impl.TTagServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1")
public class TagController {

    @Autowired
    private TTagMapper tTagMapper;

//    GET /api/v1/tags
//    功能: 获取系统里所有可用标签的列表。
    @GetMapping("/tag")
    public ResponseEntity<?> getTags() {
        //查询所有标签
        tTagMapper.selectList(null);

        return ResponseEntity.ok().body(tTagMapper.selectList(null));
    }
}
